package net.qiqbframework.loadhanding;

import net.qiqbframework.common.Registration;
import net.qiqbframework.lifecycle.Lifecycle;
import net.qiqbframework.messaging.BatchMessage;
import net.qiqbframework.messaging.MessageHandler;

import javax.annotation.Nonnull;
import java.util.Map;

/**
 * 聚合加载总线
 */
public interface AggregateLoadBus extends Lifecycle {


    <A> A load(@Nonnull LoadMessage<?, A> loadMessage);


    Registration subscribe(@Nonnull String aggregateNaming, @Nonnull MessageHandler<? super LoadMessage<?, ?>> handler);


}
